On Mac OS X Server, choose WebObjects
Rule Editor in the Apple menu.
On Windows, choose Rule Editor in the WebObjects program group.
When the Rule Editor starts, it opens a new, untitled rule file.
Note that the Rule Editor uses formal rule terminology to refer to parts of a rule. Formally, a rule is expressed as follows:
The condition of a rule is known as the left hand side of the rule (lhs), the key is known as the right hand side key (rhs key), and the value is known as the right hand side value (rhs value). For example, a rule that right aligns numeric text fields can be expressed as follows:(not (attribute = nil)) and ((attribute.valueClassName = 'NSNumber') or (attribute.valueClassName = 'NSDecimalNumber')) => alignment = "Right"
In this rule, the condition or lhs is:((not (attribute = nil)) and ((attribute.valueClassName = 'NSNumber') or (attribute.valueClassName = 'NSDecimalNumber')))
The key or rhs key is "alignment", and the value or rhs value is "Right."
The priority of the Assistant's rules is 100. Use a lower priority than 100 if you want the Assistant's rules to be preferred to your own rules, or a higher priority otherwise. Don't create rules that have the same priority as the Assistant's rules, because this can confuse the Assistant.
The priority of the default rules is 0, so both the Assistant's and your custom rules are preferred to the default rules.
In the Class pop-up list on the right side of the window, select Assignment. This class is selected by default, so you shouldn't actually have to change it. Other assignment classes allow you to programmatically determine rule results. For more information, see Developing WebObjects Applications with Direct to Web.
Rules are stored in files with the extension .d2wmodel.
In addition to your custom rule file, there are two other rule files that are used by an application: a file containing the default rules and a file containing the Assistant's rules. The default rules are also in a file named d2w.d2wmodel, but the default rule file is located in the Resources folder of the DirectToJavaClient framework. The other rule file is the Assistant's rule file. It is located in the Resources folder of an application's project along with the custom rules file, but it has the name user.d2wmodel.
You can look at the Assistant rules by opening the user.d2wmodel; simply double-click the file, which opens it in the Rule Editor. However, don't edit the Assistant's file because the Assistant writes out the file whenever it saves, removing rules it doesn't create itself. By storing your custom rules in the d2w.d2wmodel file, you can write custom rules and still use the Assistant.